$(function () {
    var myChart1 = echarts.init(document.querySelector('#c1'));

        // 指定图表的配置项和数据
        var option = {
            title: {
                text: '2019年数据'
            },
            tooltip: {},
            legend: {
                data:['人数']
            },
            xAxis: {
                data: ["一月","二月","三月","四月","五月","六月"]
            },
            yAxis: {},
            series: [{
                name: '人数',
                type: 'bar',
                data: [55, 20, 36, 40, 67, 120]
            }]
        };

        // 使用刚指定的配置项和数据显示图表。
        myChart1.setOption(option);


        // 表2
        var myChart2 = echarts.init(document.querySelector('#c2'));

        var option = {
            tooltip: {
                trigger: 'item',
                formatter: "{a} <br/>{b}: {c} ({d}%)"
            },
            legend: {
                orient: 'vertical',
                x: 'left',
                data:['阿迪达斯','耐克','老北京布鞋','李宁','新百伦']
            },
            series: [
                {
                    name:'品牌',
                    type:'pie',
                    radius: ['50%', '70%'],
                    avoidLabelOverlap: false,
                    label: {
                        normal: {
                            show: false,
                            position: 'center'
                        },
                        emphasis: {
                            show: true,
                            textStyle: {
                                fontSize: '30',
                                fontWeight: 'bold'
                            }
                        }
                    },
                    labelLine: {
                        normal: {
                            show: false
                        }
                    },
                    data:[
                        {value:335, name:'阿迪达斯'},
                        {value:310, name:'耐克'},
                        {value:234, name:'联盟广告'},
                        {value:135, name:'李宁'},
                        {value:1548, name:'新百伦'}
                    ]
                }
            ]
        };
        myChart2.setOption(option);
        
})